﻿{extend name="public:base" /}

{block name="css"}
<link href="/static/laydate/theme/default/laydate.css">
{/block}

{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox-title">
                <h3>补贴申请总数：{$count}条</h3>
            </div>
            <div class="ibox ">
                <div class="ibox-title">
                    <a href="{:url('doSubsidy')}" class="btn btn-primary btn-lg">新增</a>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="iconfont icon-chevron_up"></i>
                        </a>
                    </div>
                </div>

                <div class="ibox-content">
                    <div class="row search-form">
                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <input placeholder="请输入单位名称" name="company_name" value="{:input('company_name')}" type="text" class="form-control form-control-lg">
                            </div>
                        </div>
                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <input placeholder="请选择日期" name="create_time" value="{:input('create_time')}" type="text" class="form-control form-control-lg screen-date" readonly>
                            </div>
                        </div>

                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <select name="status" class="form-control form-control-lg">
                                    <option value="0">请选择审核状态</option>
                                    <option value="1" {:input('status') == 1 ? 'selected' : ''}>待审核</option>
                                    <option value="2" {:input('status') == 2 ? 'selected' : ''}>审核通过</option>
                                    <option value="-1" {:input('status') == -1 ? 'selected' : ''}>审核不通过</option>
                                </select>
                            </div>
                        </div>

                        <div class="col-sm-4 m-b-sm">
                            <div class="input-group">
                                <button type="button" class="btn btn-primary btn-lg screen-btn">搜索</button>
                            </div>
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="table-responsive">
                        <table class="table table-striped">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>单位名称</th>
                                <th>项目名称</th>
                                <th>盖章文件</th>
                                <th>状态</th>
                                <th>申请时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="list" id="vo"}
                            <tr>
                                <td>{$vo.id}</td>
                                <td>{$vo.company_name}</td>
                                <td>{$vo.project_id|getProjectName}</td>
                                <td>
                                    {volist name=":doFiles($vo.file_ids)" id="v"}
                                    <a href="{$v.path}">{$v.name}</a><br>
                                    {/volist}
                                </td>
                                <td>{$vo.status_desc}</td>
                                <td>{:timeFormat($vo.create_time)}</td>
                                <td class="project-actions">
                                    <a href="{:url('subsidyDetail', ['id' => $vo.id])}" class="btn btn-white btn-sm">
                                        <i class="iconfont icon-edit"></i> 详情
                                    </a>
                                </td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                        {if !empty($list)}{$list->render()}{/if}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>



{/block}

{block name='js'}
<script src="/static/laydate/laydate.js"></script>
<script>
    laydate.render({
        elem: '.screen-date' //指定元素
    });
</script>
{/block}
